/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Harold
 */
@Entity
@Table(name = "in_year")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "InYear.findAll", query = "SELECT i FROM InYear i"),
    @NamedQuery(name = "InYear.findByIdYear", query = "SELECT i FROM InYear i WHERE i.idYear = :idYear")})
public class InYear implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_year")
    private Integer idYear;

    public InYear() {
    }

    public InYear(Integer idYear) {
        this.idYear = idYear;
    }

    public Integer getIdYear() {
        return idYear;
    }

    public void setIdYear(Integer idYear) {
        this.idYear = idYear;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idYear != null ? idYear.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InYear)) {
            return false;
        }
        InYear other = (InYear) object;
        if ((this.idYear == null && other.idYear != null) || (this.idYear != null && !this.idYear.equals(other.idYear))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.InYear[ idYear=" + idYear + " ]";
    }
    
}
